package com.nov.multidatasource.holder;

import com.nov.multidatasource.entity.primary.V3DepartDO;
import com.nov.multidatasource.entity.primary.V3FileInfo;
import com.nov.multidatasource.entity.secondary.V6FileInfo;
import com.nov.multidatasource.entity.secondary.V6TaskInfoEntity;

import java.util.List;
import java.util.Map;

/**
 * @ClassName ThreadLocalHolder
 * @Description TODO
 * @Author cxn
 * @CreateTime 2024/12/26 11:06
 * @Since 1.0.0
 */
public class ThreadLocalHolder {

    public static InheritableThreadLocal<List<V6TaskInfoEntity>> errorV6TaskInfoEntityList = new InheritableThreadLocal<>();
    public static InheritableThreadLocal<List<V3FileInfo>> errorV3FileInfoList = new InheritableThreadLocal<>();
    public static InheritableThreadLocal<List<V6FileInfo>> errorV6FileInfoList = new InheritableThreadLocal<>();
    public static InheritableThreadLocal<Map<String, List<V3DepartDO>>> departCodeMap = new InheritableThreadLocal<>();


    public static  void removeAll(){
        errorV6TaskInfoEntityList.remove();
        errorV3FileInfoList.remove();
        errorV6FileInfoList.remove();
        departCodeMap.remove();
    }

}
